package com.ruoyi.driver.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.driver.mapper.TbDriverCredentialsMapper;
import com.ruoyi.driver.domain.TbDriverCredentials;
import com.ruoyi.driver.service.ITbDriverCredentialsService;

/**
 * 司机证件Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-27
 */
@Service
public class TbDriverCredentialsServiceImpl implements ITbDriverCredentialsService 
{
    @Autowired
    private TbDriverCredentialsMapper tbDriverCredentialsMapper;

    /**
     * 查询司机证件
     * 
     * @param credentialsId 司机证件主键
     * @return 司机证件
     */
    @Override
    public TbDriverCredentials selectTbDriverCredentialsByCredentialsId(Integer credentialsId)
    {
        return tbDriverCredentialsMapper.selectTbDriverCredentialsByCredentialsId(credentialsId);
    }

    /**
     * 查询司机证件列表
     * 
     * @param tbDriverCredentials 司机证件
     * @return 司机证件
     */
    @Override
    public List<TbDriverCredentials> selectTbDriverCredentialsList(TbDriverCredentials tbDriverCredentials)
    {
        return tbDriverCredentialsMapper.selectTbDriverCredentialsList(tbDriverCredentials);
    }

    /**
     * 新增司机证件
     * 
     * @param tbDriverCredentials 司机证件
     * @return 结果
     */
    @Override
    public int insertTbDriverCredentials(TbDriverCredentials tbDriverCredentials)
    {
        return tbDriverCredentialsMapper.insertTbDriverCredentials(tbDriverCredentials);
    }

    /**
     * 修改司机证件
     * 
     * @param tbDriverCredentials 司机证件
     * @return 结果
     */
    @Override
    public int updateTbDriverCredentials(TbDriverCredentials tbDriverCredentials)
    {
        return tbDriverCredentialsMapper.updateTbDriverCredentials(tbDriverCredentials);
    }

    /**
     * 批量删除司机证件
     * 
     * @param credentialsIds 需要删除的司机证件主键
     * @return 结果
     */
    @Override
    public int deleteTbDriverCredentialsByCredentialsIds(Integer[] credentialsIds)
    {
        return tbDriverCredentialsMapper.deleteTbDriverCredentialsByCredentialsIds(credentialsIds);
    }

    /**
     * 删除司机证件信息
     * 
     * @param credentialsId 司机证件主键
     * @return 结果
     */
    @Override
    public int deleteTbDriverCredentialsByCredentialsId(Integer credentialsId)
    {
        return tbDriverCredentialsMapper.deleteTbDriverCredentialsByCredentialsId(credentialsId);
    }
}
